/*
 * @Author: your name
 * @Date: 2020-07-03 20:43:49
 * @LastEditTime: 2020-09-19 14:33:00
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \myBlog\blog\util\apiUrl.js
 */
import Axios from 'axios';

// const URL = 'http://127.0.0.1:7001/blog/'
const URL = 'http://106.52.76.36:7001/blog/'

const API = {}

// 获取导航栏类别列表
API.getTypeList = () => {
    return Axios(URL + 'getTypeList/')
}

// 获取首页文章列表(总列表+推荐列表+技术类别)
API.getHomeArticle = () => {
    return Axios(URL + 'getHomeArticle/')
}

// 文章页 对应技术类别的列表
API.getSkillTypeList = (id) => {
    return Axios(URL + 'getSkillTypeList/' + id)
}
// 文章页 搜索关键词
API.getKeywordList = (str) => {
    return Axios(URL + 'getKeywordList/' + str)
}

// 获取详情页
API.getArticleDetails = (id) => {
    return Axios(URL + 'getArticleDetails/' + id)
}

// 获取生活
API.getLiveList = () => {
    return Axios(URL + 'getLiveList/')
}

// 获取互动 个人信息+留言
API.getInteract = () => {
    return Axios(URL + 'getInteract/')
}

// 获取句子
API.getSentence = () => {
    return Axios(URL + 'getSentence/')
}

// 获取技术类型
API.getSkillType = () => {
    return Axios(URL + 'getSkillType/')
}

// 新增留言
API.sendMessage = (data) =>{
    return Axios({
        method:'post',
        url: URL + 'sendMessage/',
        data
    })
}
// 新增留言回复
API.replyMessage = (data) =>{
    return Axios({
        method:'post',
        url: URL + 'replyMessage/',
        data
    })
}



export default API